package org.jeecg.modules.chvegetable.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.chvegetable.entity.FlowerTagBook;

import java.util.List;

/**
 * @Description: 采后台账表
 * @Author: jeecg-boot
 * @Date: 2023-02-07
 * @Version: V1.0
 */
public interface IFlowerTagBookService extends IService<FlowerTagBook> {

    /**
     * 入库
     *
     * @return
     * @descriptionauthor
     * @author gf
     * 2023-2-11 8:58
     */
    Integer inBooks(String mainID,boolean isIn);

    /**
     * 占用库存
     *
     * @return java.lang.Integer
     * @descriptionauthor
     * @author gf
     * 2023-2-11 8:59
     * [mainID]
     */
    Integer lockTagnumfroOut(String mainID);

    /**
     * 占用库存 - 撤销
     *
     * @return java.lang.Integer
     * @descriptionauthor
     * @author gf
     * 2023-2-11 8:59
     * [mainID]
     */
    Integer lockTagnumfroOutBack(String mainID);

    /**
     *
     * 获取库存不够的产品，根据出库单id
     * @return java.util.List<org.jeecg.modules.flower.entity.FlowerTagBook>
     * @descriptionauthor
     * @author gf
     * 2023-2-10 16:03
     * [id]
     */
    List<FlowerTagBook> getLowBookList(String id);

    /**
     * 获取库存不够的产品，根据  预出库单id
     * @descriptionauthor
     * @author gf
     * 2023-2-11 17:35
     * [id]
     * @return java.util.List<org.jeecg.modules.flower.entity.FlowerTagBook>
     */
    List<FlowerTagBook> getLowBookListPre(String id);

    /**
     * 出库单扣减库存---
     *
     * @return java.lang.Integer
     * @descriptionauthor
     * @author gf
     * 2023-2-10 9:33
     * [flowerOutorder, list]
     */
    Integer subBookInfoFromOutOrder(String id);

    /**
     * 出库单扣减库存--- 撤销
     *
     * @return java.lang.Integer
     * @descriptionauthor
     * @author gf
     * 2023-2-10 14:17
     * [id]
     */
    Integer subBookInfoFromOutOrderBack(String id);

    /**
     * 预出库=====单扣减库存---
     *
     * @return java.lang.Integer
     * @descriptionauthor
     * @author gf
     * 2023-2-10 9:33
     * [flowerOutorder, list]
     */
    Integer subBookInfoFromOutOrderPre(String id);
    /**
     * 预出库=====单扣减库存---撤销
     * @descriptionauthor
     * @author gf
     * 2023-2-11 17:36
     * [flowerOutorderPre, list]
     * @return java.lang.Integer
     */
    Integer subBookInfoFromOutOrderPreBack(String id);

    /**
     * 校验台账数据 是否为负
     *
     * @return java.lang.Integer
     * @descriptionauthor
     * @author gf
     * 2023-2-10 16:00
     * []
     */
    Integer checkBooksIsErr();

    FlowerTagBook getTOtal(Wrapper<FlowerTagBook> wrapper);

}
